Skip to content

Conversation

@AmarTrebinjac
Copy link
Contributor

@AmarTrebinjac AmarTrebinjac commented Jan 6, 2026

Changes

Put a profile completion card in place of the brief card when the user has not completed his profile
Screenshot 2026-01-12 at 09 23 47
Screenshot 2026-01-12 at 09 23 39

Experiments

profile_completion_card

Events

No new tracking events, using existing completeAction mutation with new action type.

Preview domain

https://profile-card-v2.preview.app.daily.dev

AmarTrebinjac and others added 3 commits January 6, 2026 16:46
Adds a new ProfileCompletionCard component that encourages users to complete their profile by showing their progress and the next incomplete section. The card displays in the first feed slot and takes priority over the brief card, using the existing ProfileCompletion logic and displaying a cabbage-themed design.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Haiku 4.5 <[email protected]>
- Use softer, less saturated brand purple colors for border and button
- Replace generic text with benefit-focused copy for each profile section
- Add section-specific CTAs that explain the value of completing each field

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Haiku 4.5 <[email protected]>
…ing sections

- Replaced custom brand color scheme with default card styling (neutral border and background)
- Added dismiss button to hide the card with action tracking
- Changed card body to display all incomplete profile sections as a bullet list
- Added ProfileCompletionCard action type for dismissal tracking
- Updated useProfileCompletionIndicator to respect dismissal state

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Haiku 4.5 <[email protected]>
@vercel
Copy link

vercel bot commented Jan 6, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
daily-webapp Ready Ready Preview Jan 13, 2026 11:50am
1 Skipped Deployment
Project Deployment Review Updated (UTC)
storybook Ignored Ignored Jan 13, 2026 11:50am

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Haiku 4.5 <[email protected]>
When the user dismisses the profile completion card, the brief card
should not appear as a replacement.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Haiku 4.5 <[email protected]>
Create useProfileCompletionCard hook with useConditionalFeature to control
card visibility via GrowthBook. Card only shows when feature is enabled,
user is on My Feed, profile is incomplete, and card hasn't been dismissed.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
…card

- Reorder hooks so profile card is evaluated before brief card
- Brief card feature only evaluates when profile card definitively won't show
- Add isLoading state to prevent brief card flash while profile card loads
- Use hasNotDismissed pattern (requires isActionsFetched) to match brief card

This ensures users are only exposed to one experiment at a time,
preventing skewed A/B test statistics.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Add impression, click, and dismiss event tracking following the same
pattern as marketing CTAs.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
LogEvent.Dismiss doesn't exist - use Click with target_id to
differentiate between CTA click and dismiss actions.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@AmarTrebinjac AmarTrebinjac changed the title refactor: improve profile completion card with dismiss and sections list feat: profile completion card Jan 12, 2026
@AmarTrebinjac AmarTrebinjac marked this pull request as ready for review January 12, 2026 09:51
@AmarTrebinjac AmarTrebinjac requested a review from a team as a code owner January 12, 2026 09:51
Copy link
Contributor

@rebelchris rebelchris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@claude see my feedback, see if you agree or not / adjust what you agree with.

};

const profileCompletionCardBorder =
'1px solid color-mix(in srgb, var(--theme-accent-cabbage-subtler), transparent 50%)';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: why is this not tailwind?

'1px solid color-mix(in srgb, var(--theme-accent-cabbage-subtler), transparent 50%)';

const profileCompletionCardBg =
'linear-gradient(180deg, color-mix(in srgb, var(--theme-accent-cabbage-bolder), transparent 92%) 0%, color-mix(in srgb, var(--theme-accent-cabbage-bolder), transparent 96%) 100%)';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: this should be in gradient file

'linear-gradient(180deg, color-mix(in srgb, var(--theme-accent-cabbage-bolder), transparent 92%) 0%, color-mix(in srgb, var(--theme-accent-cabbage-bolder), transparent 96%) 100%)';

const profileCompletionButtonBg =
'color-mix(in srgb, var(--theme-accent-cabbage-default), transparent 20%)';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: can also be tailwind iirc

Comment on lines +111 to +118
const firstIncompleteItem = incompleteItems[0];
const progress = profileCompletion?.percentage ?? 0;
const isCompleted = progress === 100;
const isDismissed =
isActionsFetched && checkHasCompleted(ActionType.ProfileCompletionCard);

const shouldShow =
profileCompletion && !isCompleted && firstIncompleteItem && !isDismissed;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is there so much calculations in the useProfileCompletionCard hook and also here?

@claude
Copy link
Contributor

claude bot commented Jan 12, 2026

Claude finished @AmarTrebinjac's task in 1m 30s —— View job


Reviewing PR feedback

Tasks

  • Read ProfileCompletionCard.tsx
  • Read useProfileCompletionCard.ts hook
  • Analyze review comments
  • Provide feedback on each comment

Review Feedback

I've reviewed @rebelchris's comments and here's my analysis:

1. Lines 36-37, 42-43: Inline styles should be Tailwind

✅ AGREE - These should be converted to Tailwind utilities where possible.

  • Line 37 (border: profileCompletionCardBorder): The border uses color-mix() with cabbage accent. While Tailwind doesn't have a direct utility for this complex color-mix, this could potentially use a border color class if we add it to the theme.
  • Line 43 (background: profileCompletionButtonBg): Same situation with color-mix() for transparency.

However, I notice the codebase has a pattern of using backdrop-blur-3xl as a Tailwind class (line 164), so that part is already correct.

The question is: should these color-mix values be in the Tailwind config or as CSS variables? Looking at the existing pattern, it seems like the answer depends on reusability.

2. Line 40: Gradient should be in gradient file

✅ STRONGLY AGREE - This is an established pattern in the codebase.

Looking at packages/shared/src/styles/custom.ts, I can see there's already a dedicated file for custom colors and gradients. The file contains:

  • briefCardBorder, briefCardBg, briefButtonBg (lines 12-18)
  • bookmarkProviderListBg (line 9-10)
  • Other similar custom styles

The profile completion card styles should follow this exact same pattern and be moved to custom.ts. This improves:

  • Maintainability: One place to update colors
  • Consistency: Same approach as brief card
  • Discoverability: Other developers know where to find custom styles

Fix this →

3. Line 118: Too many calculations split between hook and component

🤔 PARTIALLY AGREE - There is some duplication, but it's not as bad as it might seem.

Looking at the code:

In the hook (useProfileCompletionCard.ts):

const isCompleted = (profileCompletion?.percentage ?? 100) === 100;
const isDismissed = isActionsFetched && checkHasCompleted(ActionType.ProfileCompletionCard);
const shouldEvaluate = isMyFeed && !isCompleted && hasNotDismissed;

In the component (ProfileCompletionCard.tsx:112-118):

const progress = profileCompletion?.percentage ?? 0;
const isCompleted = progress === 100;
const isDismissed = isActionsFetched && checkHasCompleted(ActionType.ProfileCompletionCard);
const shouldShow = profileCompletion && !isCompleted && firstIncompleteItem && !isDismissed;

The duplication is:

  • isCompleted calculation - duplicated
  • isDismissed calculation - duplicated

However, there's a reason: The hook is used in Feed.tsx to determine whether to show the profile completion card OR the brief card (lines 212-221). The component needs its own shouldShow logic because it has additional requirements (firstIncompleteItem must exist).

Possible improvements:

  1. The component could receive isCompleted and isDismissed as props from the parent (Feed.tsx already calls the hook)
  2. OR keep the current approach since the logic is simple and the duplication is minimal

I'd say this is a minor issue - the duplication is only 2 simple calculations, and having the component be self-contained has benefits for testing and reusability. But if we want to be strict about DRY principles, we could refactor.

Consider this refactor →


Summary

Comment Verdict Priority
Lines 37, 43 - Use Tailwind Agree (with nuance) Medium
Line 40 - Move gradient to custom.ts Strongly Agree High
Line 118 - Reduce calculation duplication Partially Agree Low

The most important fix is moving the custom styles to custom.ts to follow the established codebase pattern. The calculation duplication is minor and may not be worth refactoring given the current architecture.


Move custom color-mix styles from ProfileCompletionCard to the
centralized custom.ts file, following the established pattern
used by briefCardBorder/briefCardBg/briefButtonBg.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@AmarTrebinjac AmarTrebinjac merged commit a05e08a into main Jan 13, 2026
11 checks passed
@AmarTrebinjac AmarTrebinjac deleted the profile-card-v2 branch January 13, 2026 11:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants